package com.ryan.security.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Created by kaimin on 31/12/2018.
 * time : 23:31
 */
@Target({ElementType.FIELD,ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = MyConstraintValidator.class)
public @interface MyValidator {

    String message() default "{com.ryan.security.validator.MyValidator.message}";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
    //这三个值必须写
}
